<?php

/**
 * WeEngine System
 *
 * (c) We7Team 2021 <https://www.w7.cc>
 *
 * This is not a free software
 * Using it under the license terms
 * visited https://www.w7.cc for more details
 */

namespace app;

use Itwmw\Validate\Attributes\ValidateAttributesFactory;
use Itwmw\Validate\Middleware\ValidateMiddlewareConfig;
use think\Service;
use W7\Validate\Support\Storage\ValidateConfig;

class ValidateService extends Service
{
    public function register(): void
    {
        ValidateConfig::instance()->setRulesPath('app\\validate\\rules\\');
        ValidateMiddlewareConfig::instance()->setValidateFactory(new ValidateAttributesFactory());
    }
}
